package com.shanzmoo.admin.domain.dto;

import cn.hutool.core.bean.BeanUtil;
import com.shanzmoo.db.store.entity.StoreStockAllotBillEntity;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotNull;


/**
 * 仓库调拨单 更新对象
 *
 * @author Gzhao 2021-03-11
 */
@Data
@ApiModel("仓库调拨单-更新对象")
public class StoreStockAllotBillUpdateDTO extends StoreStockAllotBillSaveDTO{

    private static final long serialVersionUID = 1L;

    @NotNull(message = "调拨单id不允许为空")
    @ApiModelProperty(value = "调拨单id")
    private Integer id;

    @Override
    public StoreStockAllotBillEntity convertEntity() {
        StoreStockAllotBillEntity target = new StoreStockAllotBillEntity();
        BeanUtil.copyProperties(this, target, true);
        return target;
    }
}
